<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<!DOCTYPE html>
		<html>
			<head>
				<meta charset="utf-8" />
				<title></title>
			</head>
			<body>
				<script type="text/javascript">
					 //第一题
					 let a1,b1,c1=[1,2,3,];
					 console.log(a1,b1,c1);
					 let [a2,b2,c2]=[1,2,3,];
					 console.log(a2,b2,c2);
					 let [a3,b3,c3]=[1,,3.];
					 console.log(a3,b3,c3);
					 let [a4,b4]=[1];
					 console.log(a4,b4);
					 let{y:a5,b5}={x:1,y:2};
					 console.log(a5,b5);
					 let {a6,b6}=123;
					 console.log(a6,b6);//周于靖209010139
					
					// //第二题
					 let set=new Set();
					 set.add(1);
					 set.add(2);
					 set.add(3);
					 set.delete(2);//周于靖209010139
					 let i=set.values();
					 console.log(i.next());
					 console.log(i.next());
					 console.log(i.next());
					
					// //第三题
					 let map=new Map();
					 map.set(1,"a");
					 map.set(2,"b");
					 map.set(3,"c");
					 map.set(4,"d");
					 for(let i=1;i<=map.size;i++){
					 	console.log(map.get(i));
					 }//周于靖209010139
					 map.forEach(function(value,key){
					 	console.log(value);
					 });
					 for(let v of map.values()){
					 	console.log(v);
					 }
					 for(var prop in map){
					 	console.log(prop);
					 }//用于遍历数组或类数组的键值，只会遍历自身的属性，并且只能输出可枚举属性
					
					 //第四题
					 let arr1=[1,2,3];
					 let arr2=arr1;//周于靖209010139
					 console.log(arr1==arr2);//arr1与arr2完全相同
					 let arr3=[...arr1];
					 console.log(arr1==arr3);//前者输出的是数组，后者输出的是对象，所以不一样
					
					 //第五题
					
					 let arr4=[1,2,3];
					 arr4.forEach((v,k)=>console.log(v));//周于靖209010139
					
					 //第六题
					 Array.of(1,2,3).filter(i=>i>1).forEach(i=>console.log(i));
					 let fib=n=>n>1?fib(n-1)+fib(n-2):n;//用递归方法求i和n
					
					//第七题
					class Animal{
						constructor(name,shout) {
						    this.name=name;
							
						}
						shout(){
							console.log("我叫");
						}
						eat(){
							console.log("吃");
						}
					}
					class Dog extends Animal{
						constructor(name,age) {
						    super(name);
							this.age=age;
						}
					}
					var a=new Dog("小狗","4");
					console.log(a);//周于靖 209010139
					
				</script>
			</body>
		</html>
		
	</body>
</html>
